﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<根据接口ID取得接口下的产品>
-- =============================================
CREATE PROCEDURE [dbo].[proc_AB_Interface_GetProductByInterfaceId]
(
	@InterfaceId INT
)
AS
BEGIN
DECLARE @pid VARCHAR(200)
 SELECT @pid=ProductId FROM AB_Interface WHERE id =@InterfaceId
set @pid=REPLACE(@pid,'{','')
SET @pid=REPLACE(@pid,'}',',')
SET @pid= SUBSTRING(@pid,0, LEN(@pid))
--SELECT @pid
DECLARE @str VARCHAR(1000)
SET @str='SELECT id,title FROM Product WHERE id IN ('+@pid+')'
EXEC(@str)

	SET NOCOUNT ON;
END